# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kross
pkgver=5.73.0
pkgrel=0
pkgdesc="Framework for scripting KDE applications"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="qt5-qtbase-dev qt5-qttools-dev kcompletion-dev kcoreaddons-dev ki18n-dev kiconthemes-dev kio-dev kparts-dev kwidgetsaddons-dev kxmlgui-dev"
makedepends="$depends_dev extra-cmake-modules kdoctools-dev qt5-qttools-static"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/kross-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="54e4e82e2a1b23081514638821b12b067362ee43e1168617dfbead2419bc465b2dfcd293a1d6d7387fbf16f75cb43a058a487952be59a0e472ce92a04c469112  kross-5.73.0.tar.xz"
